<template>
  <el-dialog
    :visible.sync="visible"
    width="650px"
    :show-close="true"
    :before-close="close"
  >
    <div class="content">打印是否成功</div>
    <div class="buttons">
      <el-button class="dialog-btn" @click="submit">成功</el-button>
      <el-button class="dialog-btn outline" @click="goRePrint">重新打印</el-button>
      <el-button class="dialog-btn outline" @click="close">修改信息</el-button>
    </div>
  </el-dialog>
</template>

<script type="text/ecmascript-6">
export default {
  name: 'print-dialog',
  props: {
    visible: {
      type: Boolean,
      default: false
    }
  },
  methods: {
    close () {
      this.$emit('close', false)
    },
    submit () {
      this.$emit('submit', 'close')
    },
    goRePrint () {
      this.$emit('submit', 'reset')
    }
  }
}
</script>

<style lang="scss" scoped>
.content {
  font-size: 24px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #333333;
  line-height: 30px;
  text-align: center;
  padding-top: 60px;
  padding-bottom: 100px;
}
.buttons {
  padding-top: 20px;
  text-align: center;
  .dialog-btn {
    padding: 0;
    width: 140px;
    height: 40px;
    line-height: 38px;
    border-radius: 0;
    border: 1px solid #02579a;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #ffffff;
    background: #02579a;
    margin-left: 20px;
    &.outline {
      color: #02579a;
      background: #fff;
    }
  }
}
</style>
